Skip to content

feat(rsr): direct capability declaration primary; preset optional#392

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/modest-hawking-3fd6it
Jun 20, 2026
Merged

feat(rsr): direct capability declaration primary; preset optional#392
hyperpolymath merged 1 commit into
mainfrom
claude/modest-hawking-3fd6it

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Refines the just-merged template-applicability model (#391) to the pure capability-gating shape: a profile declares capabilities = [...] directly as the primary form, and preset becomes optional sugar (a named bundle expanded from the gate data). This matches the chosen "capability-gated profile" approach while keeping presets available for ergonomics.

Precedence: capabilities, preset, and add all union; remove subtracts; at least one of capabilities / preset is required.

Changes

  • scripts/check-rsr-profile.sh — accept a direct capabilities list; preset is now optional (error only if a profile declares neither).
  • TEMPLATE-APPLICABILITY-POLICY.adoc — capability declaration is the model; presets are optional shorthand (updated Model, profile example, and Presets section).
  • .machine_readable/template-capability-gates.toml — note presets are optional.

Verification

  • Direct-capabilities profile (no preset) → OK.
  • Preset profile (arghda-core rust-cli) → still OK.
  • A planted abi.ipkg under the direct form → still flagged VESTIGIAL.
  • A profile declaring neither capabilities nor preset → clean error (exit 2).

Note: arghda-core's existing rsr-profile.a2ml (which uses preset = "rust-cli") remains valid — preset is now demonstrated as the optional form, so no change is needed there.

Follow-up to #391 (per the agreed pure-gating-primary direction).

🤖 Generated with Claude Code

https://claude.ai/code/session_019GiSiEfgZCte35dyykgBHs


Generated by Claude Code

Refines the template-applicability model (standards#391) per the chosen pure
capability-gating shape: a profile declares `capabilities = [...]` directly as
the primary form; `preset` becomes optional sugar (a named bundle expanded from
the gate data). `capabilities`, `preset`, and `add` union; `remove` subtracts;
at least one of `capabilities`/`preset` is required.

- check-rsr-profile.sh: accept direct `capabilities`; preset optional.
- TEMPLATE-APPLICABILITY-POLICY.adoc: capability declaration is the model,
  presets are optional shorthand (Model + profile example + Presets section).
- template-capability-gates.toml: note presets are optional.

Verified: direct-capabilities profile (no preset) → OK; preset profile
(arghda-core rust-cli) still → OK; vestigial abi.ipkg still flagged under the
direct form; a profile declaring neither errors cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019GiSiEfgZCte35dyykgBHs
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 148 issues detected

Severity Count
🔴 Critical 60
🟠 High 75
🟡 Medium 13

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in scorecard.yml",
    "type": "missing_workflow",
    "file": "scorecard.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in scorecard-enforcer.yml",
    "type": "scorecard_publish_with_run_step",
    "file": "scorecard-enforcer.yml",
    "action": "split_scorecard_publish_job",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in instant-sync.yml",
    "type": "secret_action_without_presence_gate",
    "file": "instant-sync.yml",
    "action": "peter-evans/repository-dispatch",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Required file missing (condition: public_repo)",
    "type": "missing_requirement",
    "file": ".github/workflows/scorecard.yml",
    "action": "create",
    "rule_module": "cicd_rules",
    "severity": "high"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/standards/standards/scripts/check-ts-allowlist.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "Agda postulate assumes without proof -- potential soundness hole (4 occurrences, CWE-704)",
    "type": "agda_postulate",
    "file": "/home/runner/work/standards/standards/lol/proofs/theories/information_theory.agda",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "innerHTML assignment -- XSS risk, use textContent or SafeDOM (5 occurrences, CWE-79)",
    "type": "js_innerhtml",
    "file": "/home/runner/work/standards/standards/avow-protocol/public/demo.js",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "innerHTML assignment -- XSS risk, use textContent or SafeDOM (1 occurrences, CWE-79)",
    "type": "js_innerhtml",
    "file": "/home/runner/work/standards/standards/axel-protocol/src/Tea.res.js",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Wildcard CORS -- restrict to specific origins or use env var (1 occurrences, CWE-942)",
    "type": "js_wildcard_cors",
    "file": "/home/runner/work/standards/standards/consent-aware-http/examples/reference-implementations/deno/aibdp_middleware.js",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "HTTP URL in Nickel config -- must use HTTPS (1 occurrences, CWE-319)",
    "type": "ncl_http_url",
    "file": "/home/runner/work/standards/standards/k9-svc/register.ncl",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath marked this pull request as ready for review June 20, 2026 07:41
@hyperpolymath hyperpolymath merged commit 3e57141 into main Jun 20, 2026
22 checks passed
@hyperpolymath hyperpolymath deleted the claude/modest-hawking-3fd6it branch June 20, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants